/**
 * 红色高速公路名字
 */
const textList = [
  {
    position: [110.123385281677486, 34.442539170877272],
    text: '高速1'
  },
  {
    position: [114.340490606577825, 36.165969059143032],
    text: '高速2'
  },
  {
    position: [116.555070130353846, 33.428765653020348],
    text: '高速3'
  },
  {
    position: [116.19973881577385, 31.644038526210966],
    text: '高速4'
  },
]
function routeTextFun(that) {
  textList.forEach((v) => {
    // 创建纯文本标记
    var text = new AMap.Text({
      text: v.text,
      anchor: "bottom-center", // 设置文本标记锚点
      draggable: false,
      cursor: "pointer",
      style: {
        padding: ".75rem 1.25rem",
        "margin-bottom": "1rem",
        "border-radius": ".25rem",
        "background-color": "white",
        width: "15rem",
        "border-width": 0,
        "box-shadow": "0 2px 6px 0 rgba(114, 124, 245, .5)",
        "text-align": "center",
        "font-size": "20px",
        color: "blue",
      },
      position: v.position,
    });

    text.setMap(that.map);
  });
}

export default routeTextFun